package com.dog.basics.api.controller.common;

import com.dog.basics.bean.dto.api.common.AppVersionInfoApiPageDto;
import com.dog.basics.bean.vo.api.common.ApiAppVersionInfoApiVo;
import com.dog.basics.common.constant.SwaggerConstants;
import com.dog.basics.common.util.PageParam;
import com.dog.basics.common.util.R;
import com.dog.basics.service.common.IDogAppVersionInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * app版本信息
 *
 * @author dog
 */
@RestController
@RequestMapping("/api/version")
@Api(value = "APP版本信息接口", tags = SwaggerConstants.API_ALL)
@AllArgsConstructor
public class ApiAppVersionController {
    private final IDogAppVersionInfoService appVersionInfoService;


    /**
     * @Description: APP版本信息
     * @Param: type
     * @return: AppVersionInfoVo
     * @Author: wph
     * @Date: 2020/3/27 0027
     */
    @ApiOperation(value = "APP版本信息", notes = "APP版本信息", tags = SwaggerConstants.API_MY)
    @GetMapping("/newest/version")
    public R<ApiAppVersionInfoApiVo> getAppVersionInfo(PageParam param, AppVersionInfoApiPageDto dto) {
        return R.ok(appVersionInfoService.getAppVersionInfo(param, dto));
    }


}
